using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using AntEater.ComponentModel.BuildElements;
using AntEater.ComponentModel;

namespace AntEater.Runtime.UI
{
    /// <summary>
    /// Provides a control to visualize build element properties.
    /// </summary>
    public partial class BuildElementPropertyView : UserControl
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:BuildElementPropertyView"/> class.
        /// </summary>
        public BuildElementPropertyView() {
            InitializeComponent();
        }

        private IBuildElement _selectedBuildElement;

        /// <summary>
        /// Gets or sets the selected build element.
        /// </summary>
        /// <value>The selected build element.</value>
        public IBuildElement SelectedBuildElement {
            get { return _selectedBuildElement; }
            set {    
                _selectedBuildElement = value;
                buildElementPropertyGrid.SelectedObject = _selectedBuildElement;
            }
        }    
    }
}
